import com.yx.entity.Person;
import com.yx.service.PersonService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Classname test
 * @Description TODO:
 * @Date 2021/05/18 11:08
 * @Created by yx
 */
public class test {

    @Test
    public void t1(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        PersonService personService = (PersonService) ac.getBean("personService");
        personService.getAll().forEach(System.out::println);
    }

    @Test
    public void t2(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("application.xml");
        PersonService personService = (PersonService) ac.getBean("personService");
        personService.getAll().forEach(System.out::println);
    }

}
